home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / PInterfaces / Video.p < prev    next >
Text File  |  1996-05-01  |  31KB  |  689 lines

  1. {
  2.      File:        Video.p
  3.  
  4.      Contains:    Video Driver Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT Video;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __VIDEO__}
  28. {$SETC __VIDEO__ := 1}
  29.  
  30. {$I+}
  31. {$SETC VideoIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __QUICKDRAW__}
  35. {$I Quickdraw.p}
  36. {$ENDC}
  37.  
  38. {$PUSH}
  39. {$ALIGN MAC68K}
  40. {$LibExport+}
  41.  
  42.  
  43. CONST
  44.     mBaseOffset                    = 1;                            { Id of mBaseOffset. }
  45.     mRowBytes                    = 2;                            { Video sResource parameter Id's  }
  46.     mBounds                        = 3;                            { Video sResource parameter Id's  }
  47.     mVersion                    = 4;                            { Video sResource parameter Id's  }
  48.     mHRes                        = 5;                            { Video sResource parameter Id's  }
  49.     mVRes                        = 6;                            { Video sResource parameter Id's  }
  50.     mPixelType                    = 7;                            { Video sResource parameter Id's  }
  51.     mPixelSize                    = 8;                            { Video sResource parameter Id's  }
  52.     mCmpCount                    = 9;                            { Video sResource parameter Id's  }
  53.     mCmpSize                    = 10;                            { Video sResource parameter Id's  }
  54.     mPlaneBytes                    = 11;                            { Video sResource parameter Id's  }
  55.     mVertRefRate                = 14;                            { Video sResource parameter Id's  }
  56.     mVidParams                    = 1;                            { Video parameter block id. }
  57.     mTable                        = 2;                            { Offset to the table. }
  58.     mPageCnt                    = 3;                            { Number of pages }
  59.     mDevType                    = 4;                            { Device Type }
  60.     oneBitMode                    = 128;                            { Id of OneBitMode Parameter list. }
  61.     twoBitMode                    = 129;                            { Id of TwoBitMode Parameter list. }
  62.     fourBitMode                    = 130;                            { Id of FourBitMode Parameter list. }
  63.     eightBitMode                = 131;                            { Id of EightBitMode Parameter list. }
  64.  
  65.     sixteenBitMode                = 132;                            { Id of SixteenBitMode Parameter list. }
  66.     thirtyTwoBitMode            = 133;                            { Id of ThirtyTwoBitMode Parameter list. }
  67.     firstVidMode                = 128;                            { The new, better way to do the above.  }
  68.     secondVidMode                = 129;                            {  QuickDraw only supports six video  }
  69.     thirdVidMode                = 130;                            {  at this time.       }
  70.     fourthVidMode                = 131;
  71.     fifthVidMode                = 132;
  72.     sixthVidMode                = 133;
  73.     spGammaDir                    = 64;
  74.     spVidNamesDir                = 65;
  75.  
  76. {  csTimingFormat values in VDTimingInfo  }
  77. {  look in the declaration rom for timing info  }
  78.     kDeclROMtables                = 'decl';
  79.  
  80. {
  81.  Timing mode constants for Display Manager MultiMode support
  82.     Corresponding    .h equates are in Video.h
  83.                     .a equates are in Video.a
  84.                     .r equates are in DepVideoEqu.r
  85.     
  86.     The first enum is the old names (for compatibility).
  87.     The second enum is the new names.
  88. }
  89.     timingApple12                = 130;                            {   512x384 (60 Hz) Rubik timing. }
  90.     timingApple12x                = 135;                            {   560x384 (60 Hz) Rubik-560 timing. }
  91.     timingApple13                = 140;                            {   640x480 (67 Hz) HR timing. }
  92.     timingApple13x                = 145;                            {   640x400 (67 Hz) HR-400 timing. }
  93.     timingAppleVGA                = 150;                            {   640x480  (60 Hz) VGA timing. }
  94.     timingApple15                = 160;                            {   640x870 (75 Hz) FPD timing. }
  95.     timingApple15x                = 165;                            {   640x818 (75 Hz) FPD-818 timing. }
  96.     timingApple16                = 170;                            {   832x624 (75 Hz) GoldFish timing. }
  97.     timingAppleSVGA                = 180;                            {   800x600  (56 Hz) SVGA timing. }
  98.     timingApple1Ka                = 190;                            {  1024x768 (60 Hz) VESA 1K-60Hz timing. }
  99.     timingApple1Kb                = 200;                            {  1024x768 (70 Hz) VESA 1K-70Hz timing. }
  100.     timingApple19                = 210;                            {  1024x768  (75 Hz) Apple 19" RGB. }
  101.     timingApple21                = 220;                            {  1152x870  (75 Hz) Apple 21" RGB. }
  102.  
  103.     timingInvalid                = 0;                            {  Unknown timing... force user to confirm. }
  104.     timingApple_512x384_60hz    = 130;                            {   512x384  (60 Hz) Rubik timing. }
  105.     timingApple_560x384_60hz    = 135;                            {   560x384  (60 Hz) Rubik-560 timing. }
  106.     timingApple_640x480_67hz    = 140;                            {   640x480  (67 Hz) HR timing. }
  107.     timingApple_640x400_67hz    = 145;                            {   640x400  (67 Hz) HR-400 timing. }
  108.     timingVESA_640x480_60hz        = 150;                            {   640x480  (60 Hz) VGA timing. }
  109.     timingApple_640x870_75hz    = 160;                            {   640x870  (75 Hz) FPD timing. }
  110.     timingApple_640x818_75hz    = 165;                            {   640x818  (75 Hz) FPD-818 timing. }
  111.     timingApple_832x624_75hz    = 170;                            {   832x624  (75 Hz) GoldFish timing. }
  112.     timingVESA_800x600_56hz        = 180;                            {   800x600  (56 Hz) SVGA timing. }
  113.     timingVESA_800x600_60hz        = 182;                            {   800x600  (60 Hz) SVGA timing. }
  114.     timingVESA_800x600_72hz        = 184;                            {   800x600  (72 Hz) SVGA timing. }
  115.     timingVESA_800x600_75hz        = 186;                            {   800x600  (75 Hz) SVGA timing. }
  116.     timingVESA_1024x768_60hz    = 190;                            {  1024x768  (60 Hz) VESA 1K-60Hz timing. }
  117.     timingVESA_1024x768_70hz    = 200;                            {  1024x768  (70 Hz) VESA 1K-70Hz timing. }
  118.     timingVESA_1024x768_75hz    = 204;                            {  1024x768  (75 Hz) VESA 1K-70Hz timing (very similar to timingApple_1024x768_75hz). }
  119.     timingApple_1024x768_75hz    = 210;                            {  1024x768  (75 Hz) Apple 19" RGB. }
  120.     timingApple_1152x870_75hz    = 220;                            {  1152x870  (75 Hz) Apple 21" RGB. }
  121.     timingAppleNTSC_ST            = 230;                            {   512x384  (60 Hz, interlaced, non-convolved). }
  122.     timingAppleNTSC_FF            = 232;                            {   640x480  (60 Hz, interlaced, non-convolved). }
  123.     timingAppleNTSC_STconv        = 234;                            {   512x384  (60 Hz, interlaced, convolved). }
  124.     timingAppleNTSC_FFconv        = 236;                            {   640x480  (60 Hz, interlaced, convolved). }
  125.     timingApplePAL_ST            = 238;                            {   640x480  (50 Hz, interlaced, non-convolved). }
  126.     timingApplePAL_FF            = 240;                            {   768x576  (50 Hz, interlaced, non-convolved). }
  127.     timingApplePAL_STconv        = 242;                            {   640x480  (50 Hz, interlaced, convolved). }
  128.     timingApplePAL_FFconv        = 244;                            {   768x576  (50 Hz, interlaced, convolved). }
  129.     timingVESA_1280x960_75hz    = 250;                            {  1280x960  (75 Hz) }
  130.     timingVESA_1280x1024_60hz    = 260;                            {  1280x1024 (60 Hz) }
  131.     timingVESA_1280x1024_75hz    = 262;                            {  1280x1024 (75 Hz) }
  132.     timingVESA_1600x1200_60hz    = 280;                            {  1600x1200 (60 Hz) VESA proposed timing. }
  133.     timingVESA_1600x1200_65hz    = 282;                            {  1600x1200 (65 Hz) VESA proposed timing. }
  134.     timingVESA_1600x1200_70hz    = 284;                            {  1600x1200 (70 Hz) VESA proposed timing. }
  135.     timingVESA_1600x1200_75hz    = 286;                            {  1600x1200 (75 Hz) VESA proposed timing. }
  136.     timingVESA_1600x1200_80hz    = 288;                            {  1600x1200 (80 Hz) VESA proposed timing (pixel clock is 216 Mhz dot clock). }
  137.     timingSMPTE240M_60hz        = 400;                            {  60Hz V, 33.75KHz H, interlaced timing, 16:9 aspect, typical resolution of 1920x1035. }
  138.     timingFilmRate_48hz            = 410;                            {  48Hz V, 25.20KHz H, non-interlaced timing, typical resolution of 640x480. }
  139.  
  140. {  csConnectFlags values in VDDisplayConnectInfo  }
  141.     kAllModesValid                = 0;                            {  All modes not trimmed by primary init are good close enough to try  }
  142.     kAllModesSafe                = 1;                            {  All modes not trimmed by primary init are know to be safe  }
  143.     kReportsTagging                = 2;                            {  Can detect tagged displays (to identify smart monitors)  }
  144.     kHasDirectConnection        = 3;                            {  True implies that driver can talk directly to device (e.g. serial data link via sense lines)  }
  145.     kIsMonoDev                    = 4;                            {  Says whether there's an RGB (0) or Monochrome (1) connection.  }
  146.     kUncertainConnection        = 5;                            {  There may not be a display (no sense lines?).  }
  147.     kTaggingInfoNonStandard        = 6;                            {  Set when csConnectTaggedType/csConnectTaggedData are non-standard (i.e., not the Apple CRT sense codes).  }
  148.     kReportsDDCConnection        = 7;                            {  Card can do ddc (set kHasDirectConnect && kHasDDCConnect if you actually found a ddc display).  }
  149.     kHasDDCConnection            = 8;                            {  Card has ddc connect now.  }
  150.  
  151. {  csDisplayType values in VDDisplayConnectInfo  }
  152.     kUnknownConnect                = 1;                            {  Not sure how we'll use this, but seems like a good idea.  }
  153.     kPanelConnect                = 2;                            {  For use with fixed-in-place LCD panels.  }
  154.     kPanelTFTConnect            = 2;                            {  Alias for kPanelConnect  }
  155.     kFixedModeCRTConnect        = 3;                            {   For use with fixed-mode (i.e., very limited range) displays.  }
  156.     kMultiModeCRT1Connect        = 4;                            {  320x200 maybe, 12" maybe, 13" (default), 16" certain, 19" maybe, 21" maybe  }
  157.     kMultiModeCRT2Connect        = 5;                            {  320x200 maybe, 12" maybe, 13" certain, 16" (default), 19" certain, 21" maybe  }
  158.     kMultiModeCRT3Connect        = 6;                            {  320x200 maybe, 12" maybe, 13" certain, 16" certain, 19" default, 21" certain  }
  159.     kMultiModeCRT4Connect        = 7;                            {  Expansion to large multi mode (not yet used)  }
  160.     kModelessConnect            = 8;                            {  Expansion to modeless model (not yet used)  }
  161.     kFullPageConnect            = 9;                            {  640x818 (to get 8bpp in 512K case) and 640x870 (these two only)  }
  162.     kVGAConnect                    = 10;                            {  640x480 VGA default -- question everything else  }
  163.     kNTSCConnect                = 11;                            {  NTSC ST (default), FF, STconv, FFconv  }
  164.     kPALConnect                    = 12;                            {  PAL ST (default), FF, STconv, FFconv  }
  165.     kHRConnect                    = 13;                            {  Straight-6 connect -- 640x480 and 640x400 (to get 8bpp in 256K case) (these two only)  }
  166.     kPanelFSTNConnect            = 14;                            {  For use with fixed-in-place LCD FSTN (aka ``Supertwist'') panels  }
  167.     kMonoTwoPageConnect            = 15;                            {  1152x870 Apple color two-page display  }
  168.     kColorTwoPageConnect        = 16;                            {  1152x870 Apple B&W two-page display  }
  169.     kColor16Connect                = 17;                            {  832x624 Apple B&W two-page display  }
  170.     kColor19Connect                = 18;                            {  1024x768 Apple B&W two-page display  }
  171.  
  172. {  csTimingFlags values in VDTimingInfoRec  }
  173.     kModeValid                    = 0;                            {  Says that this mode should NOT be trimmed.  }
  174.     kModeSafe                    = 1;                            {  This mode does not need confirmation  }
  175.     kModeDefault                = 2;                            {  This is the default mode for this type of connection  }
  176.     kModeShowNow                = 3;                            {  This mode should always be shown (even though it may require a confirm)  }
  177.     kModeNotResize                = 4;                            {  This mode should not be used to resize the display (eg. mode selects a different connector on card)  }
  178.     kModeRequiresPan            = 5;                            {  This mode has more pixels than are actually displayed  }
  179.     kModeInterlaced                = 6;                            {  This mode is interlaced (single pixel lines look bad).  }
  180.     kModeShowNever                = 7;                            {  This mode should not be shown in the user interface.  }
  181.  
  182. {  csResolutionFlags bit flags for VDResolutionInfoRec  }
  183.     kResolutionHasMultipleDepthSizes = 0;                        {  Says that this mode has different csHorizontalPixels, csVerticalLines at different depths (usually slightly larger at lower depths)  }
  184.  
  185.                                                                 {     Power Mode constants for VDPowerStateRec.powerState.     }
  186.     kAVPowerOff                    = 0;
  187.     kAVPowerStandby                = 1;
  188.     kAVPowerSuspend                = 2;
  189.     kAVPowerOn                    = 3;
  190.  
  191.                                                                 {     Power Mode masks and bits for VDPowerStateRec.powerFlags.     }
  192.     kPowerStateNeedsRefresh        = 0;
  193.     kPowerStateNeedsRefreshMask    = $00000001;
  194.  
  195.                                                                 {  Control Codes  }
  196.     cscReset                    = 0;
  197.     cscKillIO                    = 1;
  198.     cscSetMode                    = 2;
  199.     cscSetEntries                = 3;
  200.     cscSetGamma                    = 4;
  201.     cscGrayPage                    = 5;
  202.     cscGrayScreen                = 5;
  203.     cscSetGray                    = 6;
  204.     cscSetInterrupt                = 7;
  205.     cscDirectSetEntries            = 8;
  206.     cscSetDefaultMode            = 9;
  207.     cscSwitchMode                = 10;
  208.     cscSetSync                    = 11;
  209.     cscSavePreferredConfiguration = 16;
  210.     cscSetHardwareCursor        = 22;
  211.     cscDrawHardwareCursor        = 23;
  212.     cscSetConvolution            = 24;
  213.     cscSetPowerState            = 25;
  214.     cscPrivateControlCall        = 26;
  215.     cscUnusedCall                = 127;                            {  This call used to expend the scrn resource.  Its imbedded data contains more control info  }
  216.  
  217.                                                                 {  Status Codes  }
  218.     cscGetMode                    = 2;
  219.     cscGetEntries                = 3;
  220.     cscGetPageCnt                = 4;
  221.     cscGetPages                    = 4;                            {  This is what C&D 2 calls it.  }
  222.     cscGetPageBase                = 5;
  223.     cscGetBaseAddr                = 5;                            {  This is what C&D 2 calls it.  }
  224.     cscGetGray                    = 6;
  225.     cscGetInterrupt                = 7;
  226.     cscGetGamma                    = 8;
  227.     cscGetDefaultMode            = 9;
  228.     cscGetCurMode                = 10;
  229.     cscGetSync                    = 11;
  230.     cscGetConnection            = 12;                            {  Return information about the connection to the display  }
  231.     cscGetModeTiming            = 13;                            {  Return timing info for a mode  }
  232.     cscGetModeBaseAddress        = 14;                            {  Return base address information about a particular mode  }
  233.     cscGetScanProc                = 15;                            {  QuickTime scan chasing routine  }
  234.     cscGetPreferredConfiguration = 16;
  235.     cscGetNextResolution        = 17;
  236.     cscGetVideoParameters        = 18;
  237.     cscGetGammaInfoList            = 20;
  238.     cscRetrieveGammaTable        = 21;
  239.     cscSupportsHardwareCursor    = 22;
  240.     cscGetHardwareCursorDrawState = 23;
  241.     cscGetConvolution            = 24;
  242.     cscGetPowerState            = 25;
  243.     cscPrivateStatusCall        = 26;
  244.  
  245. {  Bit definitions for the Get/Set Sync call }
  246.     kDisableHorizontalSyncBit    = 0;
  247.     kDisableVerticalSyncBit        = 1;
  248.     kDisableCompositeSyncBit    = 2;
  249.     kEnableSyncOnBlue            = 3;
  250.     kEnableSyncOnGreen            = 4;
  251.     kEnableSyncOnRed            = 5;
  252.     kNoSeparateSyncControlBit    = 6;
  253.     kTriStateSyncBit            = 7;
  254.     kHorizontalSyncMask            = $01;
  255.     kVerticalSyncMask            = $02;
  256.     kCompositeSyncMask            = $04;
  257.     kDPMSSyncMask                = $07;
  258.     kTriStateSyncMask            = $80;
  259.     kSyncOnBlueMask                = $08;
  260.     kSyncOnGreenMask            = $10;
  261.     kSyncOnRedMask                = $20;
  262.     kSyncOnMask                    = $38;
  263.  
  264.                                                                 {     Power Mode constants for translating DPMS modes to Get/SetSync calls.     }
  265.     kDPMSSyncOn                    = 0;
  266.     kDPMSSyncStandby            = 1;
  267.     kDPMSSyncSuspend            = 2;
  268.     kDPMSSyncOff                = 7;
  269.  
  270. {  Bit definitions for the Get/Set Convolution call }
  271.     kConvolved                    = 0;
  272.     kLiveVideoPassThru            = 1;
  273.     kConvolvedMask                = $01;
  274.     kLiveVideoPassThruMask        = $02;
  275.  
  276.  
  277. TYPE
  278.     VPBlockPtr = ^VPBlock;
  279.     VPBlock = RECORD
  280.         vpBaseOffset:            LONGINT;                                { Offset to page zero of video RAM (From minorBaseOS). }
  281.         vpRowBytes:                INTEGER;                                { Width of each row of video memory. }
  282.         vpBounds:                Rect;                                    { BoundsRect for the video display (gives dimensions). }
  283.         vpVersion:                INTEGER;                                { PixelMap version number. }
  284.         vpPackType:                INTEGER;
  285.         vpPackSize:                LONGINT;
  286.         vpHRes:                    LONGINT;                                { Horizontal resolution of the device (pixels per inch). }
  287.         vpVRes:                    LONGINT;                                { Vertical resolution of the device (pixels per inch). }
  288.         vpPixelType:            INTEGER;                                { Defines the pixel type. }
  289.         vpPixelSize:            INTEGER;                                { Number of bits in pixel. }
  290.         vpCmpCount:                INTEGER;                                { Number of components in pixel. }
  291.         vpCmpSize:                INTEGER;                                { Number of bits per component }
  292.         vpPlaneBytes:            LONGINT;                                { Offset from one plane to the next. }
  293.     END;
  294.  
  295.     VDEntryRecordPtr = ^VDEntryRecord;
  296.     VDEntryRecord = RECORD
  297.         csTable:                Ptr;                                    { (long) pointer to color table entry=value, r,g,b:INTEGER }
  298.     END;
  299.  
  300.     VDEntRecPtr                            = ^VDEntryRecord;
  301. {  Parm block for SetGray control call  }
  302.     VDGrayRecordPtr = ^VDGrayRecord;
  303.     VDGrayRecord = RECORD
  304.         csMode:                    BOOLEAN;                                { Same as GDDevType value (0=color, 1=mono) }
  305.         filler:                    SInt8;
  306.     END;
  307.  
  308.     VDGrayPtr                            = ^VDGrayRecord;
  309. {  Parm block for SetInterrupt call  }
  310.     VDFlagRecordPtr = ^VDFlagRecord;
  311.     VDFlagRecord = RECORD
  312.         csMode:                    SInt8;
  313.         filler:                    SInt8;
  314.     END;
  315.  
  316.     VDFlagRecPtr                        = ^VDFlagRecord;
  317. {  Parm block for SetEntries control call  }
  318.     VDSetEntryRecordPtr = ^VDSetEntryRecord;
  319.     VDSetEntryRecord = RECORD
  320.         csTable:                ColorSpecPtr;                            { Pointer to an array of color specs }
  321.         csStart:                INTEGER;                                { Which spec in array to start with, or -1 }
  322.         csCount:                INTEGER;                                { Number of color spec entries to set }
  323.     END;
  324.  
  325.     VDSetEntryPtr                        = ^VDSetEntryRecord;
  326. {  Parm block for SetGamma control call  }
  327.     VDGammaRecordPtr = ^VDGammaRecord;
  328.     VDGammaRecord = RECORD
  329.         csGTable:                Ptr;                                    { pointer to gamma table }
  330.     END;
  331.  
  332.     VDGamRecPtr                            = ^VDGammaRecord;
  333.     VDBaseAddressInfoRecPtr = ^VDBaseAddressInfoRec;
  334.     VDBaseAddressInfoRec = RECORD
  335.         csDevData:                LONGINT;                                {  LONGINT - (long) timing mode  }
  336.         csDevBase:                LONGINT;                                {  LONGINT - (long) base address of the mode  }
  337.         csModeReserved:            INTEGER;                                {  INTEGER - (short) will some day be the depth  }
  338.         csModeBase:                LONGINT;                                {  LONGINT - (long) reserved  }
  339.     END;
  340.  
  341.     VDBaseAddressInfoPtr                = ^VDBaseAddressInfoRec;
  342.     VDSwitchInfoRecPtr = ^VDSwitchInfoRec;
  343.     VDSwitchInfoRec = RECORD
  344.         csMode:                    INTEGER;                                { (word) mode depth }
  345.         csData:                    LONGINT;                                { (long) functional sResource of mode }
  346.         csPage:                    INTEGER;                                { (word) page to switch in }
  347.         csBaseAddr:                Ptr;                                    { (long) base address of page (return value) }
  348.         csReserved:                LONGINT;                                { (long) Reserved (set to 0)  }
  349.     END;
  350.  
  351.     VDSwitchInfoPtr                        = ^VDSwitchInfoRec;
  352.     VDTimingInfoRecPtr = ^VDTimingInfoRec;
  353.     VDTimingInfoRec = RECORD
  354.         csTimingMode:            LONGINT;                                {  LONGINT - (long) timing mode (a la InitGDevice)  }
  355.         csTimingReserved:        LONGINT;                                {  LONGINT - (long) reserved  }
  356.         csTimingFormat:            LONGINT;                                {  LONGINT - (long) what format is the timing info  }
  357.         csTimingData:            LONGINT;                                {  LONGINT - (long) data supplied by driver  }
  358.         csTimingFlags:            LONGINT;                                {  LONGINT - (long) mode within device  }
  359.     END;
  360.  
  361.     VDTimingInfoPtr                        = ^VDTimingInfoRec;
  362.     VDDisplayConnectInfoRecPtr = ^VDDisplayConnectInfoRec;
  363.     VDDisplayConnectInfoRec = RECORD
  364.         csDisplayType:            INTEGER;                                {  INTEGER - (word) Type of display connected  }
  365.         csConnectTaggedType:    SInt8;                                    {  BYTE - type of tagging  }
  366.         csConnectTaggedData:    SInt8;                                    {  BYTE - tagging data  }
  367.         csConnectFlags:            LONGINT;                                {  LONGINT - (long) tell us about the connection  }
  368.         csDisplayComponent:        LONGINT;                                {  LONGINT - (long) if the card has a direct connection to the display, it returns the display component here (FUTURE)  }
  369.         csConnectReserved:        LONGINT;                                {  LONGINT - (long) reserved  }
  370.     END;
  371.  
  372.     VDDisplayConnectInfoPtr                = ^VDDisplayConnectInfoRec;
  373. {
  374.  RawSenseCode
  375.     This abstract data type is not exactly abstract.  Rather, it is merely enumerated constants
  376.     for the possible raw sense code values when 'standard' sense code hardware is implemented.
  377.  
  378.     For 'standard' sense code hardware, the raw sense is obtained as follows:
  379.         * Instruct the frame buffer controller NOT to actively drive any of the monitor sense lines
  380.         * Read the state of the monitor sense lines 2, 1, and 0.  (2 is the MSB, 0 the LSB)
  381.  
  382.     IMPORTANT Note: 
  383.     When the 'kTaggingInfoNonStandard' bit of 'csConnectFlags' is FALSE, then these constants 
  384.     are valid 'csConnectTaggedType' values in 'VDDisplayConnectInfo' 
  385.  
  386. }
  387.     RawSenseCode                        = UInt8;
  388.  
  389. CONST
  390.     kRSCZero                    = 0;
  391.     kRSCOne                        = 1;
  392.     kRSCTwo                        = 2;
  393.     kRSCThree                    = 3;
  394.     kRSCFour                    = 4;
  395.     kRSCFive                    = 5;
  396.     kRSCSix                        = 6;
  397.     kRSCSeven                    = 7;
  398.  
  399. {
  400.  ExtendedSenseCode
  401.     This abstract data type is not exactly abstract.  Rather, it is merely enumerated constants
  402.     for the values which are possible when the extended sense algorithm is applied to hardware
  403.     which implements 'standard' sense code hardware.
  404.  
  405.      For 'standard' sense code hardware, the extended sense code algorithm is as follows:
  406.     (Note:  as described here, sense line 'A' corresponds to '2', 'B' to '1', and 'C' to '0')
  407.         * Drive sense line 'A' low and read the values of 'B' and 'C'.  
  408.         * Drive sense line 'B' low and read the values of 'A' and 'C'.
  409.         * Drive sense line 'C' low and read the values of 'A' and 'B'.
  410.  
  411.     In this way, a six-bit number of the form BC/AC/AB is generated. 
  412.  
  413.     IMPORTANT Note: 
  414.     When the 'kTaggingInfoNonStandard' bit of 'csConnectFlags' is FALSE, then these constants 
  415.     are valid 'csConnectTaggedData' values in 'VDDisplayConnectInfo' 
  416.  
  417. }
  418.  
  419. TYPE
  420.     ExtendedSenseCode                    = UInt8;
  421.  
  422. CONST
  423.     kESCZero21Inch                = $00;                            {  21" RGB                                  }
  424.     kESCOnePortraitMono            = $14;                            {  Portrait Monochrome                      }
  425.     kESCTwo12Inch                = $21;                            {  12" RGB                                 }
  426.     kESCThree21InchRadius        = $31;                            {  21" RGB (Radius)                         }
  427.     kESCThree21InchMonoRadius    = $34;                            {  21" Monochrome (Radius)                  }
  428.     kESCThree21InchMono            = $35;                            {  21" Monochrome                         }
  429.     kESCFourNTSC                = $0A;                            {  NTSC                                  }
  430.     kESCFivePortrait            = $1E;                            {  Portrait RGB                          }
  431.     kESCSixMSB1                    = $03;                            {  MultiScan Band-1 (12" thru 1Six")     }
  432.     kESCSixMSB2                    = $0B;                            {  MultiScan Band-2 (13" thru 19")         }
  433.     kESCSixMSB3                    = $23;                            {  MultiScan Band-3 (13" thru 21")         }
  434.     kESCSixStandard                = $2B;                            {  13"/14" RGB or 12" Monochrome         }
  435.     kESCSevenPAL                = $00;                            {  PAL                                     }
  436.     kESCSevenNTSC                = $14;                            {  NTSC                                  }
  437.     kESCSevenVGA                = $17;                            {  VGA                                      }
  438.     kESCSeven16Inch                = $2D;                            {  16" RGB (GoldFish)                       }
  439.     kESCSevenPALAlternate        = $30;                            {  PAL (Alternate)                          }
  440.     kESCSeven19Inch                = $3A;                            {  Third-Party 19''                         }
  441.     kESCSevenNoDisplay            = $3F;                            {  No display connected                  }
  442.  
  443. {
  444.  DepthMode
  445.     This abstract data type is used to to reference RELATIVE pixel depths.
  446.     Its definition is largely derived from its past usage, analogous to 'xxxVidMode'
  447.  
  448.     Bits per pixel DOES NOT directly map to 'DepthMode'  For example, on some
  449.     graphics hardware, 'kDepthMode1' may represent 1 BPP, whereas on other
  450.     hardware, 'kDepthMode1' may represent 8BPP.
  451.  
  452.     DepthMode IS considered to be ordinal, i.e., operations such as <, >, ==, etc.
  453.     behave as expected.  The values of the constants which comprise the set are such
  454.     that 'kDepthMode4 < kDepthMode6' behaves as expected.
  455. }
  456.  
  457. TYPE
  458.     DepthMode                            = INTEGER;
  459.  
  460. CONST
  461.     kDepthMode1                    = 128;
  462.     kDepthMode2                    = 129;
  463.     kDepthMode3                    = 130;
  464.     kDepthMode4                    = 131;
  465.     kDepthMode5                    = 132;
  466.     kDepthMode6                    = 133;
  467.  
  468.     kFirstDepthMode                = 128;                            {  These constants are obsolete, and just included     }
  469.     kSecondDepthMode            = 129;                            {  for clients that have converted to the above         }
  470.     kThirdDepthMode                = 130;                            {  kDepthModeXXX constants.                             }
  471.     kFourthDepthMode            = 131;
  472.     kFifthDepthMode                = 132;
  473.     kSixthDepthMode                = 133;
  474.  
  475.  
  476. TYPE
  477.     VDPageInfoPtr = ^VDPageInfo;
  478.     VDPageInfo = RECORD
  479.         csMode:                    INTEGER;                                { (word) mode within device }
  480.         csData:                    LONGINT;                                { (long) data supplied by driver }
  481.         csPage:                    INTEGER;                                { (word) page to switch in }
  482.         csBaseAddr:                Ptr;                                    { (long) base address of page }
  483.     END;
  484.  
  485.     VDPgInfoPtr                            = ^VDPageInfo;
  486.     VDSizeInfoPtr = ^VDSizeInfo;
  487.     VDSizeInfo = RECORD
  488.         csHSize:                INTEGER;                                { (word) desired/returned h size }
  489.         csHPos:                    INTEGER;                                { (word) desired/returned h position }
  490.         csVSize:                INTEGER;                                { (word) desired/returned v size }
  491.         csVPos:                    INTEGER;                                { (word) desired/returned v position }
  492.     END;
  493.  
  494.     VDSzInfoPtr                            = ^VDSizeInfo;
  495.     VDSettingsPtr = ^VDSettings;
  496.     VDSettings = RECORD
  497.         csParamCnt:                INTEGER;                                { (word) number of params }
  498.         csBrightMax:            INTEGER;                                { (word) max brightness }
  499.         csBrightDef:            INTEGER;                                { (word) default brightness }
  500.         csBrightVal:            INTEGER;                                { (word) current brightness }
  501.         csCntrstMax:            INTEGER;                                { (word) max contrast }
  502.         csCntrstDef:            INTEGER;                                { (word) default contrast }
  503.         csCntrstVal:            INTEGER;                                { (word) current contrast }
  504.         csTintMax:                INTEGER;                                { (word) max tint }
  505.         csTintDef:                INTEGER;                                { (word) default tint }
  506.         csTintVal:                INTEGER;                                { (word) current tint }
  507.         csHueMax:                INTEGER;                                { (word) max hue }
  508.         csHueDef:                INTEGER;                                { (word) default hue }
  509.         csHueVal:                INTEGER;                                { (word) current hue }
  510.         csHorizDef:                INTEGER;                                { (word) default horizontal }
  511.         csHorizVal:                INTEGER;                                { (word) current horizontal }
  512.         csHorizMax:                INTEGER;                                { (word) max horizontal }
  513.         csVertDef:                INTEGER;                                { (word) default vertical }
  514.         csVertVal:                INTEGER;                                { (word) current vertical }
  515.         csVertMax:                INTEGER;                                { (word) max vertical }
  516.     END;
  517.  
  518.     VDDefModePtr = ^VDDefMode;
  519.     VDDefMode = RECORD
  520.         csID:                    SInt8;
  521.         filler:                    SInt8;
  522.     END;
  523.  
  524.     VDSyncInfoRecPtr = ^VDSyncInfoRec;
  525.     VDSyncInfoRec = RECORD
  526.         csMode:                    SInt8;
  527.         csFlags:                SInt8;
  528.     END;
  529.  
  530.     VDSyncInfoPtr                        = ^VDSyncInfoRec;
  531.     DisplayModeID                        = LONGINT;
  532.     VideoDeviceType                        = LONGINT;
  533.     GammaTableID                        = LONGINT;
  534. {  Constants for the GetNextResolution call  }
  535.  
  536. CONST
  537.     kDisplayModeIDCurrent        = $00;                            {  Reference the Current DisplayModeID  }
  538.     kDisplayModeIDInvalid        = $FFFFFFFF;                    {  A bogus DisplayModeID in all cases  }
  539.     kDisplayModeIDFindFirstResolution = $FFFFFFFE;                {  Used in cscGetNextResolution to reset iterator  }
  540.     kDisplayModeIDNoMoreResolutions = $FFFFFFFD;                {  Used in cscGetNextResolution to indicate End Of List  }
  541.  
  542. {  Constants for the GetGammaInfoList call  }
  543.     kGammaTableIDFindFirst        = $FFFFFFFE;                    {  Get the first gamma table ID  }
  544.     kGammaTableIDNoMoreTables    = $FFFFFFFD;                    {  Used to indicate end of list  }
  545.     kGammaTableIDSpecific        = $00;                            {  Return the info for the given table id  }
  546.  
  547.  
  548. TYPE
  549.     VDResolutionInfoRecPtr = ^VDResolutionInfoRec;
  550.     VDResolutionInfoRec = RECORD
  551.         csPreviousDisplayModeID: DisplayModeID;                            {  ID of the previous resolution in a chain  }
  552.         csDisplayModeID:        DisplayModeID;                            {  ID of the next resolution  }
  553.         csHorizontalPixels:        LONGINT;                                {  # of pixels in a horizontal line at the max depth  }
  554.         csVerticalLines:        LONGINT;                                {  # of lines in a screen at the max depth  }
  555.         csRefreshRate:            Fixed;                                    {  Vertical Refresh Rate in Hz  }
  556.         csMaxDepthMode:            DepthMode;                                {  0x80-based number representing max bit depth  }
  557.         csResolutionFlags:        LONGINT;                                {  Reserved - flag bits  }
  558.         csReserved:                LONGINT;                                {  Reserved  }
  559.     END;
  560.  
  561.     VDResolutionInfoPtr                    = ^VDResolutionInfoRec;
  562.     VDVideoParametersInfoRecPtr = ^VDVideoParametersInfoRec;
  563.     VDVideoParametersInfoRec = RECORD
  564.         csDisplayModeID:        DisplayModeID;                            {  the ID of the resolution we want info on  }
  565.         csDepthMode:            DepthMode;                                {  The bit depth we want the info on (0x80 based)  }
  566.         csVPBlockPtr:            VPBlockPtr;                                {  Pointer to a video parameter block  }
  567.         csPageCount:            LONGINT;                                {  Number of pages supported by the resolution  }
  568.         csDeviceType:            VideoDeviceType;                        {  Device Type:  Direct, Fixed or CLUT;  }
  569.         csReserved:                LONGINT;                                {  Reserved  }
  570.     END;
  571.  
  572.     VDVideoParametersInfoPtr            = ^VDVideoParametersInfoRec;
  573.     VDGammaInfoRecPtr = ^VDGammaInfoRec;
  574.     VDGammaInfoRec = RECORD
  575.         csLastGammaID:            GammaTableID;                            {  the ID of the previous gamma table  }
  576.         csNextGammaID:            GammaTableID;                            {  the ID of the next gamma table  }
  577.         csGammaPtr:                Ptr;                                    {  Ptr to a gamma table data  }
  578.         csReserved:                LONGINT;                                {  Reserved  }
  579.     END;
  580.  
  581.     VDGammaInfoPtr                        = ^VDGammaInfoRec;
  582.     VDGetGammaListRecPtr = ^VDGetGammaListRec;
  583.     VDGetGammaListRec = RECORD
  584.         csPreviousGammaTableID:    GammaTableID;                            {  ID of the previous gamma table  }
  585.         csGammaTableID:            GammaTableID;                            {  ID of the gamma table following csPreviousDisplayModeID  }
  586.         csGammaTableSize:        LONGINT;                                {  Size of the gamma table in bytes  }
  587.         csGammaTableName:        CStringPtr;                                {  Gamma table name (c-string)  }
  588.     END;
  589.  
  590.     VDGetGammaListPtr                    = ^VDGetGammaListRec;
  591.     VDRetrieveGammaRecPtr = ^VDRetrieveGammaRec;
  592.     VDRetrieveGammaRec = RECORD
  593.         csGammaTableID:            GammaTableID;                            {  ID of gamma table to retrieve  }
  594.         csGammaTablePtr:        GammaTblPtr;                            {  Location to copy desired gamma to  }
  595.     END;
  596.  
  597.     VDRetrieveGammaPtr                    = ^VDRetrieveGammaRec;
  598.     VDSetHardwareCursorRecPtr = ^VDSetHardwareCursorRec;
  599.     VDSetHardwareCursorRec = RECORD
  600.         csCursorRef:            Ptr;                                    {  reference to cursor data  }
  601.         csReserved1:            UInt32;                                    {  reserved for future use  }
  602.         csReserved2:            UInt32;                                    {  should be ignored  }
  603.     END;
  604.  
  605.     VDSetHardwareCursorPtr                = ^VDSetHardwareCursorRec;
  606.     VDDrawHardwareCursorRecPtr = ^VDDrawHardwareCursorRec;
  607.     VDDrawHardwareCursorRec = RECORD
  608.         csCursorX:                SInt32;                                    {  x coordinate  }
  609.         csCursorY:                SInt32;                                    {  y coordinate  }
  610.         csCursorVisible:        UInt32;                                    {  true if cursor is must be visible  }
  611.         csReserved1:            UInt32;                                    {  reserved for future use  }
  612.         csReserved2:            UInt32;                                    {  should be ignored  }
  613.     END;
  614.  
  615.     VDDrawHardwareCursorPtr                = ^VDDrawHardwareCursorRec;
  616.     VDSupportsHardwareCursorRecPtr = ^VDSupportsHardwareCursorRec;
  617.     VDSupportsHardwareCursorRec = RECORD
  618.         csSupportsHardwareCursor: UInt32;
  619.                                                                         {  true if hardware cursor is supported  }
  620.         csReserved1:            UInt32;                                    {  reserved for future use  }
  621.         csReserved2:            UInt32;                                    {  must be zero  }
  622.     END;
  623.  
  624.     VDSupportsHardwareCursorPtr            = ^VDSupportsHardwareCursorRec;
  625.     VDHardwareCursorDrawStateRecPtr = ^VDHardwareCursorDrawStateRec;
  626.     VDHardwareCursorDrawStateRec = RECORD
  627.         csCursorX:                SInt32;                                    {  x coordinate  }
  628.         csCursorY:                SInt32;                                    {  y coordinate  }
  629.         csCursorVisible:        UInt32;                                    {  true if cursor is visible  }
  630.         csCursorSet:            UInt32;                                    {  true if cursor successfully set by last set control call  }
  631.         csReserved1:            UInt32;                                    {  reserved for future use  }
  632.         csReserved2:            UInt32;                                    {  must be zero  }
  633.     END;
  634.  
  635.     VDHardwareCursorDrawStatePtr        = ^VDHardwareCursorDrawStateRec;
  636.     VDConvolutionInfoRecPtr = ^VDConvolutionInfoRec;
  637.     VDConvolutionInfoRec = RECORD
  638.         csDisplayModeID:        DisplayModeID;                            {  the ID of the resolution we want info on  }
  639.         csDepthMode:            DepthMode;                                {  The bit depth we want the info on (0x80 based)  }
  640.         csPage:                    LONGINT;
  641.         csFlags:                UInt32;
  642.         csReserved:                UInt32;
  643.     END;
  644.  
  645.     VDConvolutionInfoPtr                = ^VDConvolutionInfoRec;
  646.     VDPowerStateRecPtr = ^VDPowerStateRec;
  647.     VDPowerStateRec = RECORD
  648.         powerState:                LONGINT;
  649.         powerFlags:                LONGINT;
  650.         powerReserved1:            LONGINT;
  651.         powerReserved2:            LONGINT;
  652.     END;
  653.  
  654.     VDPowerStatePtr                        = ^VDPowerStateRec;
  655. {
  656.     Private Data to video drivers.
  657.     
  658.     In versions of MacOS with multiple address spaces (System 8), the OS 
  659.     must know the extent of parameters in order to move them between the caller
  660.     and driver.  The old private-selector model for video drivers does not have
  661.     this information so:
  662.     
  663.     For post-7.x Systems private calls should be implemented using the cscPrivateCall
  664. }
  665.     VDPrivateSelectorDataRecPtr = ^VDPrivateSelectorDataRec;
  666.     VDPrivateSelectorDataRec = RECORD
  667.         privateParameters:        LogicalAddress;                            {  Caller's parameters }
  668.         privateParametersSize:    ByteCount;                                {  Size of data sent from caller to driver }
  669.         privateResults:            LogicalAddress;                            {  Caller's return area. Can be nil, or same as privateParameters. }
  670.         privateResultsSize:        ByteCount;                                {  Size of data driver returns to caller. Can be nil, or same as privateParametersSize. }
  671.     END;
  672.  
  673.     VDPrivateSelectorRecPtr = ^VDPrivateSelectorRec;
  674.     VDPrivateSelectorRec = RECORD
  675.         reserved:                UInt32;                                    {  Reserved (set to 0).  }
  676.         data:                    ARRAY [0..0] OF VDPrivateSelectorDataRec;
  677.     END;
  678.  
  679. {$ALIGN RESET}
  680. {$POP}
  681.  
  682. {$SETC UsingIncludes := VideoIncludes}
  683.  
  684. {$ENDC} {__VIDEO__}
  685.  
  686. {$IFC NOT UsingIncludes}
  687.  END.
  688. {$ENDC}
  689.